 package org.lq.his.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.lq.his.dao.SectionDao;
import org.lq.his.pojo.Section;
import org.lq.his.service.SectionService;
import org.springframework.stereotype.Service;

@Service("sectionService")
public class SectionServiceImpl implements SectionService{

	@Resource
	private SectionDao sectionDao;
	
	public void setSectionDao(SectionDao sectionDao) {
		this.sectionDao = sectionDao;
	}

	//分页查询
	@Override
	public List<Section> getListByCondition(int start,int limit,Section condition,String column,String orderBy) {
		
		return sectionDao.getListByCondition(start, limit, condition, column, orderBy);
	}

	@Override
	public Integer getCountByCondition(Section condition) {
		
		return sectionDao.getCountByCondition(condition);
	}
	
	//添加科室
	@Override
	public void add(Section Section) {
		
		sectionDao.add(Section);
	}
	
	//修改科室
	@Override
	public void update(Section section) {
		
		sectionDao.update(section);
	}

	//根据ID查询
	@Override
	public Section getById(Integer id) {
		
		return sectionDao.getById(id);
	}

	//删除科室
	@Override
	public void deleteByIds(Integer[] ids) {
		
		sectionDao.deleteByIds(ids);
	}

	//修改State状态
	@Override
	public void editState(Section section) {
		
		sectionDao.editState(section);
	}

	//查询所有
	@Override
	public List<Section> getAll() {
		
		return sectionDao.getAll();
	}
	

}
